package com.wx.day07.API;


import jakarta.servlet.http.HttpSession;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("api")
public class APIController {

    //获取前端数据 放入session中
    @GetMapping("show")
    public String show(@RequestParam String account, HttpSession session) {
        session.setAttribute("account", account);
        String res = (String) session.getAttribute("account");
        System.out.println("session = " + res);

        return "success";
    }
}
